package com.lyy.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Id;
import java.util.Date;

@Data
@TableName("tb_image")
public class ImageInfo {

    @Id
    @TableId(value = "id", type = IdType.AUTO)  //很重要，不加会造成ID特别大
    private Long id;

    @ApiModelProperty(value = "图片名称")
    private String name;

    @ApiModelProperty(value = "图片路径")
    private String path;

    @ApiModelProperty(value = "图片大小")
    private String size;

    @ApiModelProperty(value = "图片类型")
    private String mediaType;

    @ApiModelProperty(value = "图片后缀")
    private String suffix;

    @ApiModelProperty(value = "图片高度")
    private String height;

    @ApiModelProperty(value = "图片宽度")
    private String width;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)  //mybatis-plus自动填充时间
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)  //mybatis-plus自动填充时间
    private Date modifiedTime;
}
